# Makefile for building the shared library "libTerminal.so"
# for the Linux operating system.
#
OS = linux
SHARED_OBJECT_EXT = so
TARGET = libTerminal.${SHARED_OBJECT_EXT}

CC = gcc
# "-D_USE_NCURSESW" was added for handling UTF-8 characters (contributed by Leos Urban)
#CFLAGS = -fpic -shared -D_USE_NCURSESW_
CFLAGS = -fpic -shared -D_USE_CURSES_

# The file "jni.h" is in ${JAVA_HOME}/include
# The file "jni_md.h" (included from jni.h) contains machine-dependent 
# type definitions and is in ${JAVA_HOME}/include/${OS}
INCLUDES = -I${JAVA_HOME}/include -I${JAVA_HOME}/include/${OS} -I../include

# Changed "-lncurses" to "-lncursesw" (Leos Urban)
#LIBS = -lncursesw
LIBS = -lncurses

all : ${TARGET}

${TARGET} : Toolkit.c ../include/charva_awt_Toolkit.h Makefile.${OS}.txt
	${CC} ${CFLAGS} ${INCLUDES} Toolkit.c ${LIBS} -o ../lib/${TARGET}

